<!-- 住院管理 -->
<template>
	<view class="in-hospital-wrapper">
		<view class="top-btn" @click="goToPage('/pages/inHospital/orderHospital')">
			<text>预约住院</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		onLoad() {
			this.api_empty()
			// this.api_appointment()
		},
		methods: {

			api_appointment() {
				let currentUserCard = uni.getStorageSync('current_user_card')
				this.$app._post_form2("entry/wxapp/apihospitalized.appointment", {
					"depid": "136",
					"cardid": currentUserCard.numcard,
					"patname": "黄健",
					"status": "3", //1危 2急 3一般
					"date": "2023-07-29",
					"desc": "感冒了",
					"contacts": "黄健",
					"phone": "13768615461"
				}, (res) => {
					console.log(res)
					
				})
			},
			
			api_empty() {
				let currentUserCard = uni.getStorageSync('current_user_card')
				this.$app._post_form2("entry/wxapp/apihospitalized.empty", {
					"depid": "1120",
					"sex": "0"
				}, (res) => {
					console.log(res)
					
				})
			},

			goToPage(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.in-hospital-wrapper {
		width: 100%;
		height: 100%;
		box-sizing: border-box;
		padding: 15px;

		.top-btn {
			width: 100%;
			line-height: 40px;
			background-color: #41C177;
			border-radius: 6px;
			color: #fff;
			text-align: center;
		}
	}
</style>